<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateConclusionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('conclusion', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('process_id')->comment('工作流过程id');
            $table->string('conclusion_name')->comment('步骤结果');
            $table->integer('next_process_id')->default(0)->comment('进入下一步骤id');
            $table->tinyInteger('flag')->default(0)->comment('1：成功,2：失败,3:待定');
            $table->tinyInteger('status')->default(0)->comment('0：展示，1:不展示');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `conclusion` comment '过程结果表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('conclusion');
    }
}
